<template>
	<view>
		<!-- 1，logo -->
		<view class="logo">
			<image :src="require('@/static/logo.png')"></image>
		</view>
		<!-- 2，title -->
		<view class="title">
			<view class="title-text">
				掌上邻里
			</view>
			<view class="title-bb">
				Version {{version}}
			</view>
		</view>
		<!-- 3，协议 -->
		<view class="bottom">
			<view class="xy">
				<text @click="gotoPrivateXy">《隐私协议》</text>
				<text @click="gotoUserXy">《用户协议》</text>
			</view>
			<view class="js">
				科兴科技有限公司版权所有
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				version: '1.6.0'
			}
		},
		methods: {
			gotoUserXy() {
				uni.navigateTo({
					url: '/subpkg/main/my/agree-on/user-xy/user-xy'
				})
			},
			gotoPrivateXy() {
				uni.navigateTo({
					url: '/subpkg/main/my/agree-on/private-xy/private-xy'
				})
			},
			getNowVersion() {
				plus.runtime.getProperty(plus.runtime.appid, (info) => {
					this.version = info.version
					// this.version = info.version;
					// this.versionCode = info.versionCode ;
					//return uni.$showMsg('当前版本' + info.version)
				})
			}
		},
		onLoad() {
			this.getNowVersion()
		},
		activated() {
			this.getNowVersion()
		}
	}
</script>

<style lang="scss" scoped>
	.logo {
		text-align: center;

		image {
			width: 400rpx;
			height: 400rpx;
		}
	}

	.title {
		.title-text {
			text-align: center;
			font-size: 36rpx;
			margin-bottom: 20rpx;
		}

		.title-bb {
			text-align: center;
			font-size: 32rpx;
		}
	}

	.bottom {
		position: fixed;
		bottom: 0;
		width: 100%;

		.xy {
			width: 100%;
			text-align: center;

			text {
				font-size: 30rpx;
				color: skyblue;
			}
		}

		.js {
			padding: 20rpx 0;
			text-align: center;
			width: 100%;
			font-size: 26rpx;
			color: #8295a5;
		}
	}
</style>